/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import interfaces.EventInterface;
import interfaces.ListenerInterface;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import view.Client;

/**
 *
 * @author Anders Bo Rasmussen
 */
public class ServerListener extends UnicastRemoteObject implements ListenerInterface {

    private Client client;

    public ServerListener(Client client) throws RemoteException {
        this.client = client;
    }

    @Override
    public void actionPerformed(EventInterface evt) throws RemoteException {
        client.passEvent(evt);
        System.out.println(evt.getMessage());
    }

}
